package com.popcorn.notice.controller;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.popcorn.action.Action;
import com.popcorn.action.ActionForward;
import com.popcorn.notice.dao.NoticeDAO;
import com.popcorn.notice.model.NoticeModel;

public class NoticeSelectAction_TITLE implements Action {

	@Override
	public ActionForward execute(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		NoticeDAO noticeDAO = new NoticeDAO();
		ActionForward forward = new ActionForward();
		List list=new ArrayList();
		
		String title = request.getParameter("title");
		
		list = noticeDAO.selectTITLE(title);
		request.setAttribute("Noticelist", list);
		
		forward.setRedirect(false);
   		forward.setPath("NoticeView.jsp");
		return forward;
	}

}
